package TCPDemo;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;

public class receiveDemo {

	public static void main(String[] args) throws IOException {
		ServerSocket ss = new ServerSocket(10000);
		
		Socket sk = ss.accept();
		BufferedReader br = new BufferedReader(new InputStreamReader(sk.getInputStream()));
		
		String line;
		while((line = br.readLine()) != null) {
			System.out.println(line);
			
		}
		
		sk.close();
		ss.close();
	}
}
		



